  <template>
    <div id='loan-apply-wait'>
        <el-card class="box-card box-card-left">
            <div class="bcl-top">
                <el-select v-model="value" placeholder="请选择">
                    <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                    </el-option>
                </el-select>
                <el-input v-model="phone" class="inp" placeholder="请输入内容" clearable></el-input>
                <el-button type="primary" class="btn" @click="search">搜索</el-button>
            </div>
         <!--    <ul class="bcl-content">
             <loading v-show="loading"></loading>
             <li v-for="item in records" :id="item.id" @click="goAuthDetail(item.id)">
                 <span class="list1">
                     <span>
                         {{item.name}}
                     </span>
                     <span>
                         (111)
                     </span>
                 </span>
                 <span class="list2">
                         {{item.id}}
                 </span>
             </li>
         </ul> -->
         <loading v-show="isgoAuthDetail"></loading>
            <el-table
            v-show="!isgoAuthDetail"
            :data="records"
            @row-click="goAuthDetail"
            @current-change="handleCurrentChangesss"
            highlight-current-row
            :stripe="true"
            style="width: 100%">
              <el-table-column prop="name"></el-table-column>
              <el-table-column prop="source"></el-table-column>
              <el-table-column prop="mobile"></el-table-column>
              <el-table-column prop="operator"></el-table-column>
            </el-table>
            <el-pagination
            v-show="records.length"
            class="paga"
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :page-size="10"
              :pager-count="5"
              layout="total, prev, pager, next, jumper"
              :total="total"
              :background="true">
            </el-pagination>
        </el-card>
        <el-card class="box-card box-card-right">
            <ul class="bcr-top">
                <li>
                    <img style="width:66px;height:66px;" src="../images/authPerson.jpg" alt="">
                </li>
                <li>
                    <div>触发风控规则</div>
                    <div class="mrt10">
                        <span>
                        是否触发黑名单:
                        </span>
                        <span :class="{red:loanCheckUserDetailVO.controlRisk}">
                           {{loanCheckUserDetailVO.controlRisk | booleanToStr}}
                        </span>
                    </div>
                    <!-- <div class="mrt10">触发风控规则</div> -->
                </li>
                <li>
                    <p style="height:20px;">
                        <span>
                            借款金额:
                        </span>
                        <span>
                            {{loanCheckUserDetailVO.applyAmount | toYuan }} 元
                        </span>
                    </p>
                    <p class="mrt10" style="height:20px;">
                        <span>
                            借款期限:
                        </span>
                        <span>
                            {{loanCheckUserDetailVO.applyCycle || placeholder}} 天
                        </span>
                    </p>
                    <p class="mrt10" style="height:20px;">
                        <span>
                            认证分数:
                        </span>
                        <span >
                            {{loanCheckUserDetailVO.confidence || placeholder}} 
                        </span>
                    </p>
                </li>
                <li v-show="records.length">
                    <div class="el-icon-check wh Success" @click="show_modal_pass = true"></div>
                    <div class="el-icon-close wh Danger"  @click='show_modal_reject = true'></div>
                   <!--  <div class="el-icon-check wh Success" v-if="loanCheckUserDetailVO.status=='PASS'"></div>
                    <div class="el-icon-close wh Danger"  v-if="loanCheckUserDetailVO.status=='REJECT'"></div> -->
                </li>
            </ul>
            <div class="bcr-content">
                <el-tabs @tab-click="tabClick">
                  <el-tab-pane label="基本信息">
                     <loading v-show="isgoAuthDetailRight"></loading>
                       <div class="jbxx" v-show="!isgoAuthDetailRight">
                             <div class="cardBlack" v-show="loanCheckUserDetailVO.isBlackUserRisk">
                            身份证命中触发黑名单
                        </div>
                     
                      <p class='no-data' v-show='loanCheckUserDetailVO==""'>暂无数据</p>
                      <div class="showis" v-show='loanCheckUserDetailVO!==""'>
                           <div class="title">
                              个人基本信息
                          </div>
                          <ul class="nav beee">
                          <li>
                              <span>
                                  姓名:
                              </span>
                              <a :title="loanCheckUserDetailVO.userName">
                                  {{loanCheckUserDetailVO.userName || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  年龄:
                              </span>
                              <a :title="loanCheckUserDetailVO.age">
                                 {{loanCheckUserDetailVO.age || placeholder}}
                              </a>
                          </li>
                          
                      </ul>
                      <ul class="nav">
                          <li>
                              <span>
                                  QQ号码:
                              </span>
                              <a :title="loanCheckUserDetailVO.qqNum">
                                  {{loanCheckUserDetailVO.qqNum || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  电子邮箱:
                              </span>
                              <a :title="loanCheckUserDetailVO.email">
                                  {{loanCheckUserDetailVO.email || placeholder}}
                              </a>
                          </li>
                      </ul>
                      <ul class="nav beee">
                          <li>
                              <span>
                                  身份证号:
                              </span>
                              <a :title="loanCheckUserDetailVO.idCard">
                                  {{loanCheckUserDetailVO.idCard || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  手机号:
                              </span>
                              <a :title="loanCheckUserDetailVO.mobile">
                                  {{loanCheckUserDetailVO.mobile || placeholder}}
                              </a>
                          </li>
                      </ul>
                      <ul class="nav">
                          <li>
                              <span>
                                  现居住地址:
                              </span>
                              <a :title="loanCheckUserDetailVO.addressNow">
                                  {{loanCheckUserDetailVO.addressNow || placeholder}}
                              </a>
                          </li>
                          
                      </ul>
                      <ul class="nav beee">
                          <li>
                              <span>
                                  身份证地址:
                              </span>
                              <a :title="loanCheckUserDetailVO.address">
                                  {{loanCheckUserDetailVO.address || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  芝麻分:
                              </span>
                              <a :class="{red:loanCheckUserDetailVO.zhimaScore}" :title="loanCheckUserDetailVO.zhimaScore">
                                  {{loanCheckUserDetailVO.zhimaScore || placeholder}}
                              </a>
                          </li>
                      </ul>
                      <ul class="nav">
                          <li>
                              <span>
                                  申请IP:
                              </span>
                              <a :title="loanCheckUserDetailVO.authIp">
                                  {{loanCheckUserDetailVO.authIp || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  申请地址:
                              </span>
                              <a :title="loanCheckUserDetailVO.authLocate">
                                  {{loanCheckUserDetailVO.authLocate || placeholder}}
                              </a>
                          </li>
                      </ul>
                      <ul class="nav">
                          <li>
                              <span>
                                  单位名称:
                              </span>
                              <a :title="loanCheckUserDetailVO.companyName">
                                  {{loanCheckUserDetailVO.companyName || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  单位地址:
                              </span>
                              <a :title="loanCheckUserDetailVO.companyAddress">
                                  {{loanCheckUserDetailVO.companyAddress || placeholder}}
                              </a>
                          </li>
                      </ul>
                      <div class="title title1">
                          社会关系
                      </div>
                      <ul class="nav beee">
                          <li>
                              <span>
                                  关系人姓名:
                              </span>
                              <a :title="loanCheckUserDetailVO.relationNameFirst">
                                  {{loanCheckUserDetailVO.relationNameFirst || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  与本人关系:
                              </span>
                              <a :title="loanCheckUserDetailVO.userRelationFirst">
                                  {{loanCheckUserDetailVO.userRelationFirst || placeholder}}
                              </a>
                          </li>
                      </ul>
                       <ul class="nav">
                          <li>
                              <span>
                                  电话号码:
                              </span>
                              <a :title="loanCheckUserDetailVO.relationMobileFirst">
                                  {{loanCheckUserDetailVO.relationMobileFirst || placeholder}}
                              </a>
                          </li>
                      </ul>
                      <ul class="nav beee">
                          <li>
                              <span>
                                  关系人姓名:
                              </span>
                              <a :title="loanCheckUserDetailVO.relationNameSecond">
                                  {{loanCheckUserDetailVO.relationNameSecond || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  与本人关系:
                              </span>
                              <a :title="loanCheckUserDetailVO.userRelationSecond">
                                  {{loanCheckUserDetailVO.userRelationSecond || placeholder}}
                              </a>
                          </li>
                      </ul>
                       <ul class="nav">
                          <li>
                              <span>
                                  电话号码:
                              </span>
                              <a :title="loanCheckUserDetailVO.relationMobileSecond">
                                  {{loanCheckUserDetailVO.relationMobileSecond || placeholder}}
                              </a>
                          </li>
                      </ul>
                      <div class="title title1">
                          银行卡信息
                      </div>
                      <ul class="nav beee">
                          <li>
                              <span>
                                  银行卡号:
                              </span>
                              <a :title="loanCheckUserDetailVO.cardNo">
                                  {{loanCheckUserDetailVO.cardNo || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  开户行:
                              </span>
                              <a :title="loanCheckUserDetailVO.bankName">
                                  {{loanCheckUserDetailVO.bankName || placeholder}}
                              </a>
                          </li>
                      </ul>
                      <ul class="nav">
                          <li>
                              <span>
                                  银行卡认证姓名:
                              </span>
                              <a class="lasta" :title="loanCheckUserDetailVO.userName" >
                                  {{loanCheckUserDetailVO.userName || placeholder}}
                              </a>
                          </li>
                          <li>
                              <span>
                                  银行卡预留手机号:
                              </span>
                              <a class=" lasta" :title="loanCheckUserDetailVO.mobile"> 
                                  {{loanCheckUserDetailVO.mobile || placeholder}}
                              </a>
                          </li>
                      </ul>
                      <div class="title title1">
                          照片信息
                      </div>
                      <ul class="nav nav2">
                          <li class="img" @click='setCurrentImg(loanCheckUserDetailVO.cardFront)'><img :src="loanCheckUserDetailVO.cardFront"></li>
                          <li class="img" @click='setCurrentImg(loanCheckUserDetailVO.cardBack)'><img :src="loanCheckUserDetailVO.cardBack"></li>
                          <li class="img" @click='setCurrentImg(loanCheckUserDetailVO.cardGroup)'><img :src="loanCheckUserDetailVO.cardGroup"></li>
                      </ul>
                      </div>
                       </div>
                  </el-tab-pane>
                  <!-- 通讯录 -->
                  <el-tab-pane label="通讯录" >
                     <loading v-show='loading_contact' mode='full'></loading>
                           <p class='no-data' v-if='contant'>暂无数据</p>
                              <div class="txl"  v-if='tableData.length'>
                                  <ul class="nav">
                                <li>
                                    <span>
                                        总条数:
                                    </span>
                                    <span style="left:90px;">
                                        {{numTotal || placeholder}}
                                    </span>
                                    <span style="left:130px;">
                                        条
                                    </span>
                                </li>
                                <li>
                                   <span>
                                       通讯录:
                                   </span>
                                   <span style="left:90px;">
                                       {{nameTotal || placeholder}}
                                   </span>
                                   <span style="left:130px;">
                                       条
                                   </span>
                               </li>
                            </ul>
                   
                            <div class="table-list" style="height:500px;overflow-y:scroll;">
                               <table>
                                   <thead class="table-list__head">
                                       <tr>
                                           <th>号码</th>
                                           <th>姓名</th>
                                           <th>通话次数</th>
                                           <th>通话时长</th>
                                           <th>主叫次数</th>
                                           <th>主叫时长</th>
                                           <th>被叫次数/被叫时长</th>
                                       </tr>
                                   </thead>
                                   <tbody class='table-list__body have-border' >
                                       <tr v-for='item in tableData'>
                                           <td>{{ item.mobile || placeholder }}</td>
                                           <td>{{ item.contactName || placeholder }}</td>
                                           <td>{{ item.talk_count || placeholder }}</td>
                                           <td>{{ item.talk_seconds | secondFormat }}</td>
                                           <td>{{ item.call_count || placeholder }}</td>
                                           <td>{{ item.call_seconds | secondFormat }}</td>
                                           <!-- <td>{{ item.called_count || placeholder }}</td> -->
                                           <td>{{item.called_count || placeholder}} / {{item.called_seconds | secondFormat }}</td>
                                       </tr>
                                    </tbody>
                               </table>
                          </div>
                    <el-pagination v-show="tableData.length" class="pan"  @size-change="handleSizeChangeRight" @current-change="handleCurrentChangeRight" :current-page="pageIndexright"  :page-size="10" layout=" prev, pager, next, jumper" :pager-count="5"
                             :total="totalright" :background="true">
                    </el-pagination>
                            </div>
                  </el-tab-pane>
                  
                    <el-tab-pane label="运营商信息">
                      <loading v-show="isgoAuthDetailRight"></loading>
                        <div class="yysxx" v-show="!isgoAuthDetailRight">
                             <!--  <div class="red mrl10 fw600" v-show="loanCheckUserDetailVO.callRecordRisk">
                                                         通话记录命中触发黑名单
                                                     </div>   v-show='loanCheckUserDetailVO!==""'-->
                        <p class='no-data' v-show='loanCheckUserDetailVO==""'>暂无数据</p>
                            <div class="showif" v-show='loanCheckUserDetailVO!==""'>
                              <ul class="nav" >
                                  <li>
                                      <span>
                                          运营商报告: 
                                      </span>
                                      <a target="_self" class="alink" :title="loanCheckUserDetailVO.reportUrl" :href="loanCheckUserDetailVO.reportUrl" style="left:100px;">
                                          {{ck}}
                                      </a> 
                                  </li>
                              </ul>
                             
                            </div>
                        </div>
                  </el-tab-pane>
                </el-tabs>
            </div>
        </el-card>
        <!-- 图片处理 -->
         <image-view
            v-if='currentImg'
            :show='show_modal_img' 
            :url='currentImg'
            @close='show_modal_img = false'>
        </image-view>
        <!-- 审核通过 -->
         <!-- <confirm
            :show='show_confirm_pass'
            title='确认通过申请'
            :loading='loading_pass'
            @close='show_confirm_pass=false'
            @confirm='pass'>
                 </confirm> -->
          <modal  
            :show='show_modal_pass' 
            title='审核通过'
            :loading='loading_pass'
            @confirm='passHandle'
            @close='closePass'>
            <div class="modal-form-wrap">
                <div>您确定通过审核吗？</div>
                <!-- <ul class='modal-form'>
                    <li class='form-item'>
                        <span class="form-item__key">放款金额</span>
                        <div class="form-item__value">
                            <input type="text" placeholder="请输入放款金额" v-model='amount'>
                        </div>
                    </li>
                    <li class='form-item deviceModel-select'>
                        <span class="form-item__key">借款周期</span>
                        <el-select v-model="deviceModel" placeholder="请选择周期" v-if='supportCycles.length'>
                                <el-option
                                    v-for="item in supportCycles"
                                    :key="item.id"
                                    :label="item.days"
                                    :value="item.id">
                                </el-option>
                        </el-select>
                    </li>
                    <li class='form-item'>
                        <span class="form-item__key">服务费</span>
                        <div class="form-item__value">
                            <p class="item">{{ (amount * loanCheckUserDetailVO.serviceCharge / 10) | toYuan}}元</p>
                        </div>
                    </li>
                    <li class='form-item'>
                        <span class="form-item__key">到账金额</span>
                        <div class="form-item__value">
                          {{loanCheckUserDetailVO.serviceCharge}}
                           <p class="item" v-show='!loanCheckUserDetailVO.serviceCharge'>--元</p>
                           <p class="item" v-show='amount && !loanCheckUserDetailVO.serviceCharge'>{{amount}}元</p>
                            <p class="item" >{{(amountToFen - (amount * loanCheckUserDetailVO.serviceCharge / 10)) | toYuan}} 元</p>
                        </div>
                    </li>
                    <li class='form-item'>
                        <span class="form-item__key">到期应还</span>
                        <div class="form-item__value">
                            <p class="item">{{amount}}元</p>
                        </div>
                    </li>
                </ul> -->
            </div>
        </modal>
        <!-- 审核拒绝 -->
        <modal  
            :show='show_modal_reject' 
            title='拒绝申请'
            :loading='loading_reject'
            @confirm='rejectHandle'
            @close='rejectClose'>
            <textarea class='modal__textarea' rows="5" placeholder="请输入审核拒绝原因" v-model='rejectReason'></textarea>
            <div style="margin-top:10px;">您确定拒绝申请吗？</div>
        </modal>


    </div>
</template>
<script>
    import { Promise } from 'es6-promise'
    import footerBar from '../components/FooterBar.vue'
    import selectGroup from '../components/SelectGroup.vue'
    import selectOption from '../components/SelectOption.vue'
    import radioGroup from '../components/RadioGroup.vue'
    import datePicker from '../components/DatePicker.vue'
    import areaSelect from '../components/AreaSelect.vue'
    import radio from '../components/Radio.vue'
    import loading from '../components/Loading.vue'
    import tabBox from '../components/TabBox.vue'
    import tab from '../components/Tab.vue'
    import checkBox from '../components/CheckBox.vue'
    import toolTip from '../components/ToolTip.vue'
    import modal from '../components/Modal.vue'
    import confirm from '../components/Confirm.vue'
    import imageView from '../components/ImageView.vue'
    import buttonLoading from '../components/ButtonLoading.vue'
    import { authApplyDetailValidation } from '../validation/validation'
    import dateFormat from '../filters/filter-dateFormat'
    import toYuan from '../filters/filter-toYuan'
    import  { mapGetters, mapActions }  from 'vuex'
    import { addLenderValidation, resetAccountPasswordValidation, operatorEditValidation } from '../validation/validation'
    import { loanApi, authApi, allApi, lenderApi, systemApi } from '../api/api'
    import moment from 'moment'


    export default {
        components:{
            footerBar,
            selectGroup,
            selectOption,
            radioGroup,
            tabBox,
            tab,
            radio,
            checkBox,
            areaSelect,
            loading,
            toolTip,
            modal,
            confirm,
            buttonLoading,
            imageView,
            datePicker
        },
        filters:{
            dateFormat,
            toYuan,
            booleanToStr(boolean){
                if(boolean === true){
                    return '是'
                }
                else if(boolean === false){
                    return '否'
                }else{
                    return '--'
                }
            }
        },
        data() {
            return {
                options: [{
                  value: '1',
                  label: '姓名'
                }, {
                  value: '2',
                  label: '手机号'
                }],
                value:"2",
                deviceAccount:"",
                input:"",
                currentPage4:1,
                pageSize:10,
                pageIndex:1,
                pageIndexright:1,
                deviceModel:1,
                totalright:0,
                type:0,
                phone:"",
                loading:false,
                supportCycles:[],
                seriaNumber:"",
                imei:"",
                records:[],
                isUpload:0,
                id:null,
                info:{},
                placeholder:"--",
                show_modal_img:false,
                currentImg:"",
                sessionId:"",
                total:0,
                show_confirm_pass:false,
                loading_pass:false,
                show_modal_reject:false,
                loading_reject:false,
                rejectReason:"",
                tableData: [],
                basicStatus:"",
                idCardStatus:'',
                mobileStatus:'',
                contactStatus:'',
                time:null,
                loanCheckUserDetailVO:{},
                contactStatusUpload:"",
                idCardStatusUpload:"",
                mobileStatusUpload:"",
                show_modal_pass:false,
                amount:"",
                supportCycle:"",
                allModels:[],
                deviceModelTxt:"",
                loanLendType:2,
                loading_contact:false,
                numTotal:"",
                nameTotal:"",
                isgoAuthDetail:false,
                contant:false,
                ck:"查看",
            }
        },
        computed:{
            ...mapGetters([
                'msgTip',
                'localInfo'
            ]),
            amountToFen(){
                return (this.amount * 100).toFixed(0)
            },
        },
        methods:{
            // actions
            ...mapActions([
                'showLoading',
                'hideLoading',
                'setMsgTip'
            ]),
            handleCurrentChangesss(val){
                this.currentRow = val;
            },
             getAllModels(){
               /* systemApi.allModels()
                .then(result=>{
                    this.allModels = result
                })
                .catch(error => {
                    console.error(error)
                })*/
            },
            rejectClose(){
                this.rejectReason=""
                this.show_modal_reject=false;
            },
            getCycles(){
                systemApi.allCycles()
                .then(result=>{
                    this.supportCycles = result
                    for(var m=0; m<this.supportCycles.length; m++){
                        this.supportCycles[m].days=this.supportCycles[m].days+"天"
                    }
                })
                .catch(error => {
                    console.error(error)
                })
            },
            //tabs
            tabClick(item){
                if(item.label=="通讯录"){
                    this.getContact()
                }
            },
            //审核通过
            passHandle(){
                /*if(!this.amount){
                    this.setMsgTip({
                        text:'请输入放款金额原因',
                        type:'warn'
                    })
                    return
                }
                if(this.supportCycle.value === ''){
                    this.setMsgTip({
                        text:'请选择借款周期',
                        type:'warn'
                    })
                    return
                }*/

                loanApi.pass({
                    sessionId:this.sessionId,
                    id:this.id,
                    /*lendAmount:this.amountToFen,
                    cycleId:this.deviceModel,*/
                    loanLendType:this.loanLendType ||2,
                })
                .then(result=>{
                    this.loading_pass = false
                    this.show_modal_pass = false
                    this.amount=""
                    this.initList()
                })
                .catch(error => {
                    console.error(error)
                    console.log(error)
                    this.loading_pass = false
                })
            },
            //认证申请通讯录
            getContact(){
                this.contant=false;
                this.tableData = []
                loanApi.getContact({
                    sessionId:this.sessionId,
                    id:this.id,
                    pageSize:10,
                    pageIndex:this.pageIndexright,
                })
                .then(result=>{
                  this.loading_contact = false
                  if(result.records==""){
                      this.nameTotal="--"
                      this.contant=true;
                      this.tableData = []
                      this.numTotal="--"
                      this.totalright=0
                  }else{
                    this.numTotal=result.totalCount;
                    this.nameTotal=result.records[0].mobileCount
                    this.tableData = result.records;
                    this.totalright=result.totalCount
                  }
                    
                    
                })
                .catch(error => {
                    console.error(error)
                    this.loading_contact = false
                })
            },
            closePass(){
                this.show_modal_pass=false
                this.amount=""
            },
            //审核拒绝
            rejectHandle(){
                     let params = {
                    basicStatus:this.basicStatus,
                    idCardStatus:this.idCardStatus,
                    mobileStatus:this.mobileStatus,
                    contactStatus:this.contactStatus,
                }
                console.log(params)
                //if(!authApplyDetailValidation(params)) return

                this.loading = true
                /*if(this.isUpload){
                    loanApi.blackListRiskUpload({
                        id:this.id,
                        idAddressGPSRisk:JSON.stringify(this.idCardInfo.idAddressGPSRisk),
                        normalDeviceGPSRisk:JSON.stringify(this.basicInfo.normalDeviceGPSRisk),
                        dubiousDeviceGPSRisk:JSON.stringify(this.basicInfo.dubiousDeviceGPSRisk),
                        mobileRisk:this.basicInfo.mobileRisk,
                        idnumberRisk:this.idCardInfo.idNumberRisk,
                        mobileRecordRisk:this.mobileInfo.callRecordRisk
                    })
                    .then(result=>{

                    })
                    .catch(error => {
                        console.error(error)
                    })
                }*/
                console.log(this.id)
                loanApi.reject({
                    sessionId:this.sessionId,
                    id:this.id,
                    rejectReason:this.rejectReason,
                })
                .then(result=>{
                    this.info = result
                    this.loading = false
                    this.show_modal_reject = false
                    this.rejectReason=""
                    this.initList();
                    //this.$router.back()
                })
                .catch(error => {
                    console.error(error)
                    this.loading = false
                })
            },
            //搜索
            search(){
                this.pageIndex=1;
                this.initList()
            },
            //详情展示
            goAuthDetail(row, event, column){
                if(this.msgTime){
                    if((new Date().getTime())-this.msgTime>200){
                        this.id=row.id;
                        this.loanCheckUserDetailVO=""
                        this.isgoAuthDetailRight=true
                        this.getContact();
                        this.loading_contact=true
                        loanApi.detailNew({
                            sessionId:this.sessionId,
                            id:this.id,
                        })
                        .then(result=>{
                            this.msgTime=new Date().getTime();
                            this.loading_contact=false
                            this.isgoAuthDetailRight=false
                             this.loanCheckUserDetailVO=result
                             this.loanLendType=result.loanLendType
                       
                             //pass
                           if(!result.idCardBlackRisk){
                              this.basicStatus=1
                            }else{
                              this.basicStatus=0
                            }
                            //运营商
                            //通话记录命中黑名单
                            if(!result.callRecordRisk){
                              this.mobileStatus=1
                            }else{
                              this.mobileStatus=0
                              this.mobileStatusUpload=true
                            }
                            //身份信息状态
                            //idCardBlackRisk 身份证
                            if(!result.idCardBlackRisk){
                              this.idCardStatus=1
                            }else{
                              this.idCardStatus=0
                              this.idCardStatusUpload=true
                            }
                            //通讯录状态
                            //手机号是否命中黑名单
                            if(!result.mobileBlackRisk){
                              this.contactStatus=1
                            }else{
                              this.contactStatus=0
                              this.contactStatusUpload=true
                            }

                            //触发风控规则
                            this.controlRisk=result.controlRisk
                        })
                        .catch(error => {
                            console.error(error)
                            this.loading_contact=false
                        })
                       
                        
                        
                    }
                }
            },
            //左边分页
            handleSizeChange(val) {
                console.log(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                console.log(`当前页: ${val}`);
                this.pageIndex=val;
                this.initList()
            },
            //右边分页
            handleSizeChangeRight(){
                console.log(`当前页: ${val}`);
                this.pageIndexright=val;
                this.getContact()
            },
             handleCurrentChangeRight(val) {
                console.log(`当前页: ${val}`);
                this.pageIndexright=val;
                this.getContact()
            },
             returnFn(item){
                if(item==""){
                  return false;
                }else if(item ==undefined){
                 return false; 
                }else{
                  return true;
                }
            },
            //搜索列表的接口
            initList(){
                let message=""
                let msg={
                    pageSize:this.pageSize,
                    pageIndex:this.pageIndex,
                    name:this.phone,
                    //type:this.type,
                }
                let msg1={
                    pageSize:this.pageSize,
                    pageIndex:this.pageIndex,
                    phone:this.phone,
                    //type:this.type,
                }
                if(this.value==1){
                     message=msg
                }else if(this.value==2){
                     message=msg1
                }
                  this.isgoAuthDetailRight=true
                  this.isgoAuthDetail=true
                 loanApi.waitChecklistNew(message)
                .then(result=>{
                    this.isgoAuthDetail=false
                    this.isgoAuthDetailRight=false
                    this.loading = false
                    this.records = result.page.list
                    for(var j = 0; j<this.records.length; j++){
                          if(this.records[j].name == undefined || this.records[j].name == ""){
                              this.records[j].name="--"
                          }
                          if(this.records[j].source == undefined || this.records[j].source == ""){
                              this.records[j].source="--"
                          }
                          if(this.records[j].mobile == undefined || this.records[j].mobile == ""){
                              this.records[j].mobile="--"
                          }
                          if(this.records[j].operator == undefined || this.records[j].operator == ""){
                              this.records[j].operator="--"
                          }
                      }
                     if(!this.returnFn(result.page.list)){
                        this.records=[];
                     }
                     if(!this.returnFn(result.loanCheckUserDetailVO)){
                        this.loanCheckUserDetailVO="";
                     }
                    this.total=result.page.totalRow
                    if(!this.records.length){
                        this.tableData=[]
                        this.id=""
                    }
                    if(this.records.length){
                      this.msgTime=new Date().getTime();

                      this.id=result.page.list[0].id
                      this.getContact()
                      //详情存储
                        this.loanCheckUserDetailVO=result.LoanCheckUserDetailVO
                        this.loanLendType=result.LoanCheckUserDetailVO.loanLendType
                         //pass
                       if(!result.LoanCheckUserDetailVO.idCardBlackRisk){
                          this.basicStatus=1
                        }else{
                          this.basicStatus=0
                        }
                        //运营商
                        //通话记录命中黑名单
                        if(!result.LoanCheckUserDetailVO.callRecordRisk){
                          this.mobileStatus=1
                        }else{
                          this.mobileStatus=0
                          this.mobileStatusUpload=true
                        }
                        //身份信息状态
                        //idCardBlackRisk 身份证
                        if(!result.LoanCheckUserDetailVO.idCardBlackRisk){
                          this.idCardStatus=1
                        }else{
                          this.idCardStatus=0
                          this.idCardStatusUpload=true
                        }
                        //通讯录状态
                        //手机号是否命中黑名单
                        if(!result.LoanCheckUserDetailVO.mobileBlackRisk){
                          this.contactStatus=1
                        }else{
                          this.contactStatus=0
                          this.contactStatusUpload=true
                        }

                        //触发风控规则
                        this.controlRisk=result.LoanCheckUserDetailVO.controlRisk
                    }
                })
                .catch(error => {
                    console.error(error)
                    this.isgoAuthDetail=false
                    this.isgoAuthDetailRight=false
                    this.loading = false
                })
            },
             setCurrentImg(img){
                this.currentImg = img
                this.show_modal_img = true
            },
        },
        created(){
          this.initList();
          //this.getCycles()
          //this.getAllModels()
          this.sessionId=localStorage.getItem("51SjdAdmin_sessionId")
          //this.initMsg();
        }
    }
</script>
<style>
    .tab .cell{
        color:#333;
    }
    .tab .el-table thead{
        color:#333;
    }
    .deviceModel-select .el-select{
        width:100%!important;
    }
     .box-card-left .el-table::before{
        height: 0;
    }
    #loan-apply-wait .el-table thead{
       display: none;
   }
   #loan-apply-wait .el-table__body tr.current-row>td{
        background-color: rgba(64,158,255,.15) ;
    }
</style>
<style lang="scss" scoped>
    @import "../sass/variables";
    @import "../sass/extends";
    @import "../sass/mixins";
    .alink:hover{
      color:#3399ff;
    }
    .nav-mt{
      margin-top:40px;
    }
    .btn1{
      position: absolute;
      right:46px;
      top:60px;
      width:96px;
      height:44px;
      padding:0;
      line-height:44px;
      font-size: 16px;
    }
    .search{
      padding:30px 0px 0px 30px;
      position: absolute;
      top:130px;
      left:10px;
      z-index:1000;
      width:676px;
      height:186px;
      background:#fff;
      border:1px solid #e4e7ed;
      box-shadow:0 2px 12px 0 rgba(0,0,0,.1);
      -webkit-box-shadow:0 2px 12px 0 rgba(0,0,0,.1);
    }
    .Danger{
        margin-top:8px; 
    }
     #auth-apply-wait{
        font-weight:normal;
    }
    .tab .cell{
        color:#333;
    }
    .cardBlack{
        color:red;
        margin-bottom:-22px;
        font-weight:600;
        padding-left:14px;
    }
    .pan{
        margin-top:20px;
    }
    .img{
        overflow:hidden;
        display: block;
        width: 30%;
        flex:1;
        position: relative;
        padding-top:25%;
        background-color: $sectionColor;
        img{
            width: 100%;
            height:132px;
            position: absolute;
            top:0;
            left:0;
        }
    }
    .nav{
        display:flex;
        min-height:36px;
        width:100%;
    }
    .beee{
        background:#eee;
    }
    .nav li{
        width: 342px;
        float:left;
        min-height:36px;
        position: relative;
        text-align:left;
        line-height:36px;
        //width:46%;
        padding-left:10px;
        span{
            margin-right:10px;
            //float: left;
            height: 100%;
        }

    }
    
    .nav li a{
      //width: 100px;
      left:150px;
      cursor: pointer;
      //white-space: nowrap;  
      /*文字超出用省略号*/  
      //text-overflow:ellipsis;  
    }
    .nav .sminw{
        left:150px;
    }
    .nav .sminw1{
        left:138px;
    }
    .title{
        margin:40px 0 20px 15px;
        font-weight:600;
    }
    .bcr-content{
        width:100%;
        min-height:400px;
        margin:0 auto;
    }
    .Danger{
        background:#F56C6C;
        border-radius:50%;
    }
    .Success{
        background:#67C23A;
        border-radius:50%;
    }
    .wh{
        display:block;
        width:28px;
        height:28px;
        text-align:center;
        line-height:28px;
        font-size:16px;
        color:#fff;
        cursor: pointer;
    }
    .mrt10{
        margin-top:10px;
    }
    .mrt20{
      margin-top:20px;
    }
    .red{
        color:red;
    }
    .bcr-top li{
        float:left;
        height:66px;
        color:#333;
    }
    .bcr-top li:nth-child(1){
        width:66px;
        background:#eee;
    }
    .bcr-top li:nth-child(2){
        margin-left:15px;
        min-width:150px;
    }
    .bcr-top li:nth-child(3){
        min-width:150px;
        margin-left:5%;
    }
    .bcr-top li:nth-child(4){
        margin-left:40px;
    }
    .bcr-top{
        width:100%;
        min-width:600px;
        height:86px;
        margin:0 auto;
    }
    .bcl-top{
        position:relative;
        //min-width:400px;
        margin-bottom: 6px;
        width: 500px;
    }
    .paga{
         margin-top:20px;
    }
    .list1,.list2{
        float:left;
        width:50%;
        text-align:center;
    }
    .list2{
        color:#5b5bf4;
    }
    .bcl-content li{
        width:100%;
        height:56px;
        line-height:56px;
        border-bottom:1px solid #eee;
        margin-top:10px;
    }
    .btn{
        width:96px;
        height:44px;
        margin-left:10px;
        padding:0;
        line-height:44px;
        font-size: 16px;
        span{
            position:relative;
            top:-10px;
        }
    }
    .inp{
        width:150px;
        height:44px;
        margin-left:10px;
    }
    .el-select-dropdown__item{
        height:44px!important;
    }
    #auth-apply-wait{
        font-size:16px;
        width::100%;
        height:100%;
    }
    body .sub-router{
        display:flex;
        padding:0;
    }
    .box-card-right{
      overflow-y:scroll; 
    }
    .box-card-left,.box-card-right{
        float:left;
        color:#333;
        height:800px;
    }
    body .table-list__head th, body .table-list__head td{
      font-size:16px;
    }
    @media screen and(max-width: 1600px){ 
        .box-card-left{
            height:100%;
            width:565px;
            min-width:565px;
            margin:0!important;
            margin-left:20px!important;
            margin-top:20px!important;
        }
        .box-card-right{
        //flex:2;
        //width:68%;
        min-width:565px;
        //width:565px;
        margin:0!important;
        margin-top:20px!important;
        margin-left:20px!important;
        height:100%;
       }
       /* .nav{
        min-height:36px;
             }
       .nav li{
          min-height:36px;
          position: relative;
       }
       .nav li span,a{
            position: absolute;
       }
       .nav li a{
        left:120px;
          width:100px;
          white-space: nowrap; 
          overflow: hidden; 
             文字超出用省略号  
             text-overflow:ellipsis;  
       } */
       .nav li{
          min-height:36px;
          position: relative;
          //min-width:310px;
          span{
            //float:left;
            height:100%;
            margin-right:10px;
          }
          a{
            //float:left;
            min-width:180px;
          }
       }
       .nav li .lasta{
          left:156px;
          width:85px;
       }
       .tit-a a,span{
           //display: block;
       }
       .tit-a a{
          margin-top:10px;
       }
       .bcr-top li p span:nth-child(2){
          margin-left:4px;
       }
       .bcr-top li p span{
          float: left;
       }
       .bcr-top li:nth-child(3) span{
          height:20px;
       }
       .viewWidth{
          height:515px;
          overflow-y:scroll; 
       }
       .box-card-left .el-table{
          //height:538px;
          overflow-y:scroll; 
       }
    }
   @media screen and(min-width: 1600px){ 
        .box-card-left{
            height:100%;
            width:700px;
            margin:0!important;
            margin-left:20px!important;
            margin-top:20px!important;
             overflow-y:scroll; 
        }
        .box-card-right{
        //flex:2;
        //width:68%;
         overflow-y:scroll; 
        width:900px;
        margin:0!important;
        margin-top:20px!important;
        margin-left:20px!important;
        height:100%;
       }
       .nav{
        min-height:36px;
      }
       .nav li{
          min-height:36px;
          position: relative;
          //min-width:310px;
          span{
            //float:left;
            height:100%;
            margin-right:10px;
          }
          a{
            //float:left;
            min-width:210px;
          }
       }
       
       /* .nav li a{
        left:120px;
          width:100px;
          white-space: nowrap; 
          overflow: hidden; 
      text-overflow:ellipsis;  
       } */
       .box-card-left .el-table{
          max-height:650px;
          overflow-y:scroll; 
       }
       .viewWidth{
          height:515px;
          overflow-y:scroll; 
       }
    }
    @media screen and(min-width: 2000px){ 
        .box-card-left{
            height:100%;
            width:800px;
            margin:0!important;
            margin-left:20px!important;
            margin-top:20px!important;
        }
        .box-card-right{
        //flex:2;
        width:68%;
        //width:1000px;
        margin:0!important;
        margin-top:20px!important;
        margin-left:20px!important;
        height:100%;
       }
       .nav li{
          min-height:36px;
          position: relative;
          min-width:350px;
          span{
            float:left;
            height:100%;
            margin-right:10px;
          }
          a{
            float:left;
            width:70%;
          }
       }
       
       .box-card-left .el-table{
          max-height:750px;
          overflow-y:scroll; 
       }
    }
   .title1{
    margin-top:20px;
   }
   .nav2{
        height:130px;
        display:flex;
   }
   .nav2 li{
        flex:1;
        float:left;
        width:200px;
        height:130px;
        background:#eee;
        margin-left:10px;
   }
   .nav2 li:nth-child(1){
    margin-left:0px;
   }
   .mrl{
    margin-left: 10px;
   }
</style>